using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace HRM.Models.Mapping
{
    public class dm_tk_QLSuPhamMap : EntityTypeConfiguration<dm_tk_QLSuPham>
    {
        public dm_tk_QLSuPhamMap()
        {
            // Primary Key
            this.HasKey(t => t.MaTKQLSP);

            // Properties
            this.Property(t => t.MaTKQLSP)
                .IsRequired()
                .HasMaxLength(10);

            this.Property(t => t.TenTKQLSP)
                .HasMaxLength(200);

            this.Property(t => t.HDKhac)
                .HasMaxLength(200);

            this.Property(t => t.DonViTinh)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("dm_tk_QLSuPham");
            this.Property(t => t.MaTKQLSP).HasColumnName("MaTKQLSP");
            this.Property(t => t.TenTKQLSP).HasColumnName("TenTKQLSP");
            this.Property(t => t.TrangThai).HasColumnName("TrangThai");
            this.Property(t => t.HDKhac).HasColumnName("HDKhac");
            this.Property(t => t.DonViTinh).HasColumnName("DonViTinh");
        }
    }
}
